
<template>
  <div class="container">
    <h1 @click="say()">{{msg}}</h1>
  </div>
</template>

<script>
export default {
  setup() {
    console.log('setup执行了')
    console.log(this)

    // 定义数据和函数
    const msg = 'hi vue3'
    const say = () => {
      console.log(msg,'觉得超级好用')
    }
    return {
      msg,
      say
    }
  },
  beforeCreate(){
    console.log('beforeCreated执行了')
    console.log(this,'查看beforeCreated')
  }
}
</script>
<style>
/* #app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
} */
</style>
